'use strict';
module.exports = app => {
  const { STRING, INTEGER, BOOLEAN, CHAR } = app.Sequelize;

  const MallAddress = app.model.define('mall_address', {
    user_id: {//
      type: INTEGER,
      allowNull: false,
      comment: '用户id',
    },
    consignee: {
      type: STRING,
      allowNull: false,
      comment: '收货人姓名',
    },
    phone: {
      type: CHAR(11),
      allowNull: false,
      comment: '收货人手机号码',
    },
    address: {
      type: STRING,
      allowNull: false,
      comment: '收货人的地址',
    },
    is_default: {
      type: BOOLEAN,
      allowNull: false,
      defaultValue: false,
      comment: '是否为默认地址 0:不是(默认值) 1:是',
    },

  });

  return MallAddress;
};
